package com.xinqi.xinqidev.entity.enumeration;

import lombok.Getter;

/**
 * @author xin麒
 * @date 2023/10/21 0:03
 */
@Getter
public enum HelloEnum {
    status_first(1, "第1种情况"),
    status_second(2, "第2种情况"),
    status_third(3, "第3种情况"),
    status_forth(4, "第4种情况"),
    status_fifth(5, "第5种情况");
    private final Integer status;
    private final String desc;

    HelloEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    /**
     * 获取status的对应的枚举类
     *
     * @param status
     * @return
     */
    public static HelloEnum getSettleStatusEnumByDataCode(Integer status) {
        for (HelloEnum value : HelloEnum.values()) {
            if (value.getStatus().equals(status)) {
                return value;
            }
        }
        return null;
    }


}
